package com.trainfinder.ripper;
public class TimesImpl implements Times {

	private int departureHour;
	private int departureMin;

	private int arivalHour;
	private int arivalMin;

	private int durationHour;
	private int durationMin;

	public TimesImpl(String departure, String arival, String duration) {
		departureHour = Integer.parseInt(departure.substring(0, 2));
		departureMin = Integer.parseInt(departure.substring(3, 5));
		arivalHour = Integer.parseInt(arival.substring(0, 2));
		arivalMin = Integer.parseInt(arival.substring(3, 5));
		durationHour = Integer.parseInt(duration.substring(0, 2));
		durationMin = Integer.parseInt(duration.substring(3, 5));
	}

	public int getDepartureHour() {
		return departureHour;
	}

	public int getDepartureMin() {
		return departureMin;
	}

	public int getArivalHour() {
		return arivalHour;
	}

	public int getArivalMin() {
		return arivalMin;
	}

	public int getDurationHour() {
		return durationHour;
	}

	public int getDurationMin() {
		return durationMin;
	}

}
